package experiment02;

public class experiment02 {
    public static void main(String[] args) {
       /* 定义一个二维数组*/
        int[][] a=new int[10][10] ;

        for (int i = 0; i < a.length ; i++) {

            for (int j = 0; j <= i; j++) {
                /*将a[i][0]和a[i][j]且i=j赋值为1*/
                if (i==0||j==0){
                    a[i][j]=1;
                }
                /*将其与赋值为上一行两项相加*/
                else {
                    a[i][j]=a[i-1][j-1]+a[i-1][j];
                }
                System.out.print(a[i][j]+"\t");
            }
            System.out.println();
        }
    }
}